Free-text rationales (FTRs) follow how humans communicate by explaining reasoning processes via natural language. A number of recent works have studied how to improve language model (LM) generalization by using FTRs to teach LMs the correct reasoning processes behind correct task outputs. These prior works aim to learn from FTRs by appending them to the LM input or target output, but this may introduce an input distribution shift or conflict with the task objective, respectively. We propose KNIFE, which distills FTR knowledge from an FTR-augmented teacher LM (takes both task input and FTR) to a student LM (takes only task input), which is used for inference. Crucially, the teacher LM's forward computation has a bottleneck stage in which all of its FTR states are masked out, which pushes knowledge from the FTR states into the task input/output states. Then, FTR knowledge is distilled to the student LM by training its task input/output states to align with the teacher LM's. On two question answering datasets, we show that KNIFE significantly outperforms existing FTR learning methods, in both fully-supervised and low-resource settings.
translated by 谷歌翻译
Federated learning (FL) allows multiple clients cooperatively train models without disclosing local data. However, the existing works fail to address all these practical concerns in FL: limited communication resources, dynamic network conditions and heterogeneous client properties, which slow down the convergence of FL. To tackle the above challenges, we propose a heterogeneity-aware FL framework, called FedCG, with adaptive client selection and gradient compression. Specifically, the parameter server (PS) selects a representative client subset considering statistical heterogeneity and sends the global model to them. After local training, these selected clients upload compressed model updates matching their capabilities to the PS for aggregation, which significantly alleviates the communication load and mitigates the straggler effect. We theoretically analyze the impact of both client selection and gradient compression on convergence performance. Guided by the derived convergence rate, we develop an iteration-based algorithm to jointly optimize client selection and compression ratio decision using submodular maximization and linear programming. Extensive experiments on both real-world prototypes and simulations show that FedCG can provide up to 5.3$\times$ speedup compared to other methods.
translated by 谷歌翻译
Metric-based meta-learning is one of the de facto standards in few-shot learning. It composes of representation learning and metrics calculation designs. Previous works construct class representations in different ways, varying from mean output embedding to covariance and distributions. However, using embeddings in space lacks expressivity and cannot capture class information robustly, while statistical complex modeling poses difficulty to metric designs. In this work, we use tensor fields (``areas'') to model classes from the geometrical perspective for few-shot learning. We present a simple and effective method, dubbed hypersphere prototypes (HyperProto), where class information is represented by hyperspheres with dynamic sizes with two sets of learnable parameters: the hypersphere's center and the radius. Extending from points to areas, hyperspheres are much more expressive than embeddings. Moreover, it is more convenient to perform metric-based classification with hypersphere prototypes than statistical modeling, as we only need to calculate the distance from a data point to the surface of the hypersphere. Following this idea, we also develop two variants of prototypes under other measurements. Extensive experiments and analysis on few-shot learning tasks across NLP and CV and comparison with 20+ competitive baselines demonstrate the effectiveness of our approach.
translated by 谷歌翻译
Since the recent success of Vision Transformers (ViTs), explorations toward transformer-style architectures have triggered the resurgence of modern ConvNets. In this work, we explore the representation ability of DNNs through the lens of interaction complexities. We empirically show that interaction complexity is an overlooked but essential indicator for visual recognition. Accordingly, a new family of efficient ConvNets, named MogaNet, is presented to pursue informative context mining in pure ConvNet-based models, with preferable complexity-performance trade-offs. In MogaNet, interactions across multiple complexities are facilitated and contextualized by leveraging two specially designed aggregation blocks in both spatial and channel interaction spaces. Extensive studies are conducted on ImageNet classification, COCO object detection, and ADE20K semantic segmentation tasks. The results demonstrate that our MogaNet establishes new state-of-the-art over other popular methods in mainstream scenarios and all model scales. Typically, the lightweight MogaNet-T achieves 80.0\% top-1 accuracy with only 1.44G FLOPs using a refined training setup on ImageNet-1K, surpassing ParC-Net-S by 1.4\% accuracy but saving 59\% (2.04G) FLOPs.
translated by 谷歌翻译
Pre-trained language models (PLMs) achieve remarkable performance on many downstream tasks, but may fail in giving reliable estimates of their predictive uncertainty. Given the lack of a comprehensive understanding of PLMs calibration, we take a close look into this new research problem, aiming to answer two questions: (1) Do PLMs learn to become calibrated in the training process? (2) How effective are existing calibration methods? For the first question, we conduct fine-grained control experiments to study the dynamic change in PLMs' calibration performance in training. We consider six factors as control variables, including dataset difficulty, available training samples, training steps, the number of tunable parameters, model scale, and pretraining. In experiments, we observe a consistent change in calibration performance across six factors. We find that PLMs don't learn to become calibrated in training, evidenced by the continual increase in confidence, no matter the predictions are correct or not. We highlight that our finding presents some contradiction with two established conclusions: (a) Larger PLMs are more calibrated; (b) Pretraining improves model calibration. Next, we study the effectiveness of existing calibration methods in mitigating the overconfidence issue, in both in-distribution and various out-of-distribution settings. Besides unlearnable calibration methods, we adapt two recently proposed learnable methods that directly collect data to train models to have reasonable confidence estimations. Also, we propose extended learnable methods based on existing ones to further improve or maintain PLMs calibration without sacrificing the original task performance. Experimental results show that learnable methods significantly reduce PLMs' confidence in wrong predictions, and our methods exhibit superior performance compared with previous methods.
translated by 谷歌翻译
链接预测的任务旨在解决由于难以从现实世界中收集事实而引起的不完整知识的问题。基于GCN的模型由于其复杂性而广泛应用于解决链接预测问题,但基于GCN的模型在结构和培训过程中遇到了两个问题。 1)GCN层的转化方法在基于GCN的知识表示模型中变得越来越复杂; 2)由于知识图收集过程的不完整,标记为负样本中有许多未收集的真实事实。因此,本文研究了相邻节点的信息聚合系数(自我注意)的特征,并重新设计了GAT结构的自我注意力。同时,受到人类思维习惯的启发,我们在预训练的模型上设计了一种半监督的自训练方法。基准数据集FB15K-237和WN18RR上的实验结果表明,我们提出的自我发项机制和半监督的自我训练方法可以有效地提高链接预测任务的性能。例如,如果您查看FB15K-237,则建议的方法将@1的命中率提高了约30%。
translated by 谷歌翻译
深度神经网络(DNNS)在各个领域都取得了出色的性能。但是,DNNS对对抗性示例(AE)的脆弱性阻碍了他们的部署到关键的安全应用程序。本文提出了一个新颖的AE检测框架,以值得信赖的预测为止。除了通过区分AE的异常关系与其增强版本(即邻居)与两个前景:表示相似性和标签一致性来区分检测。与监督的学习模型相比,使用现成的自我监督学习(SSL)模型用于提取表示形式,并预测其高度信息代表能力的标签。对于干净的样本,它们的表示和预测与邻居密切一致,而AE的邻居差异很大。此外,我们解释了这一观察结果,并表明,通过利用这种差异可以有效地检测到AE。我们为超越的有效性建立了严格的理由。此外,作为一种插件模型,超越的范围可以轻松与受过对抗训练的分类器(ATC)合作,从而实现最先进的(SOTA)鲁棒性精度。实验结果表明,超越表现的基线较大,尤其是在自适应攻击下。在SSL上建立的强大关系网络的授权下,我们发现超出了检测能力和速度方面优于基准。我们的代码将公开可用。
translated by 谷歌翻译
作为智能车辆控制系统的中心神经,车载网络总线对于车辆驾驶的安全至关重要。车载网络的最佳标准之一是控制器区域网络(CAN BUS)协议。但是,由于缺乏安全机制,CAN总线被设计为容易受到各种攻击的影响。为了增强车载网络的安全性并根据大量的CAN网络流量数据和提取的有价值的功能来促进该领域的研究,本研究全面比较了完全监督的机器学习与半监督的机器学习方法可以发信息异常检测。评估了传统的机器学习模型(包括单个分类器和集合模型)和基于神经网络的深度学习模型。此外,这项研究提出了一种基于自动编码器的深度自动编码器的半监督学习方法,该方法适用于CAN传达异常检测,并验证了其优于其他半监督方法的优势。广泛的实验表明,全面监督的方法通常优于半监督者,因为它们使用更多信息作为输入。通常,开发的基于XGBoost的模型以最佳准确性(98.65%),精度(0.9853)和Roc AUC(0.9585)击败了文献中报道的其他方法。
translated by 谷歌翻译
训练大型神经网络(NN)模型需要广泛的记忆资源,而激活压缩训练(ACT)是减少训练记忆足迹的一种有前途的方法。本文介绍了GACT,这是一个ACT框架,旨在支持具有有限域知识的通用NN体系结构的广泛机器学习任务。通过分析ACT近似梯度的线性化版本,我们证明了GACT的收敛性,而没有有关操作员类型或模型体系结构的先验知识。为了使训练保持稳定,我们提出了一种算法,该算法通过估计运行时对梯度的影响来决定每个张量的压缩比。我们将GACT实施为Pytorch库,很容易适用于任何NN体系结构。GACT将卷积NN,变压器和图形NNS的激活记忆降低到8.1倍,从而使4.2倍至24.7倍的训练能够较大,而精度损失可忽略不计。
translated by 谷歌翻译
文本后门攻击是对NLP系统的实际威胁。通过在训练阶段注入后门,对手可以通过预定义的触发器控制模型预测。由于已经提出了各种攻击和防御模型,因此进行严格的评估至关重要。但是,我们在以前的后门学习评估中重点介绍了两个问题:(1)忽略了现实世界情景(例如释放中毒的数据集或模型)之间的差异,我们认为每种情况都有其自身的限制和关注点,因此需要特定的评估。协议; (2)评估指标仅考虑攻击是否可以翻转模型对中毒样品的预测并保留对良性样品的表演,但是忽略了中毒样品也应该是隐秘和语义上的。为了解决这些问题,我们将现有作品分为三种实际情况,在这种情况下,攻击者分别释放数据集,预培训模型和微调模型,然后讨论其独特的评估方法。关于指标,为了完全评估中毒样本,我们使用语法误差增加和隐形性差异以及有效性的文本相似性。对框架进行正式化后,我们开发了一个开源工具包openbackdoor,以促进文本后门学习的实现和评估。使用此工具包,我们在建议的范式下进行基准攻击和防御模型进行广泛的实验。为了促进针对中毒数据集的不充分的防御能力,我们进一步提出了Cube,这是一个简单而强大的基于聚类的防御基线。我们希望我们的框架和基准可以作为未来模型开发和评估的基石。
translated by 谷歌翻译